package com.junyidao.game.service;

import com.junyidao.game.mapper.PSequenceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by HP on 2016/8/7.
 */
@Service
@Transactional
public class SequenceService {

    @Autowired
    private PSequenceMapper sequenceMapper;

    public Integer getNextSequence(String seqId) {
        Map<String, Object> map = new HashMap<>();
        map.put("seqId", seqId);
        Integer id = sequenceMapper.getNextSequence(map);
        return id;
    }
}
